package com.ebelter.btcomlib.models.bluetooth.products.three2one.bean;

import com.ebelter.btcomlib.models.db.AppDatabase;
import com.ebelter.btcomlib.utils.TimeUtils;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;

/**
 * Created by pan on 2018/7/25
 */
@Table(database = AppDatabase.class)
public class ThreeOneMesureResultBean extends BaseModel{

    public static final String TAG = "ThreeOneMesureResultBean";


    @PrimaryKey(autoincrement = true)//ID自增
    public long id;

    @Column
    public String authKey;

    //01血糖 02尿酸 03胆固醇
    @Column
    public int product;


    //type = 1空腹 2餐前 3餐后
    @Column
    public int type = 1;

    @Column
    public float mesureValue;

    @Column
    public long mesureTimeLong;
    @Column
    public String mesureTimeStr;

    public ThreeOneMesureResultBean() {
    }
    //01血糖 02尿酸 03胆固醇
    public ThreeOneMesureResultBean(int product, float mesureValue, long mesureTimeLong) {
        this.product = product;
        this.mesureValue = mesureValue;
        this.mesureTimeLong = mesureTimeLong;
        this.mesureTimeStr = TimeUtils.formatTime1(mesureTimeLong);
    }


    @Override
    public String toString() {
        return "ThreeOneMesureResultBean{" +
                "id=" + id +
                ", authKey='" + authKey + '\'' +
                ", product=" + product +
                ", type=" + type +
                ", mesureValue=" + mesureValue +
                ", mesureTimeLong=" + mesureTimeLong +
                ", mesureTimeStr='" + mesureTimeStr + '\'' +
                '}';
    }
}
